.login {
    width: 100%;
    height: 100%;
    background: linear-gradient(to top left, #71d9ff, #2fb4f9, #0ca0ff);
}

.box {
    text-align: center;
    color: #fff;
}

h1 {
    font-size: 40px;
    font-weight: 100;
    letter-spacing: 2px;
    margin-bottom: 15px;
    transition: 1s ease-in-out;
}

.form {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    opacity: 1;
    /* 不透明度改变时的过渡效果 */
    transition: opacity 0.5s;
}

.form input {
    outline: none;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background-color: rgba(255, 255, 255, 0.2);
    width: 250px;
    padding: 10px 15px;
    border-radius: 3px;
    margin: 0 auto 10px auto;
    text-align: center;
    color: #fff;
    font-size: 15px;
    transition: 0.25s;
}

.form input::placeholder {
    color: #fff;
    font-size: 14px;
    font-weight: 300;
}

.form input:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

.form input:focus {
    background-color: #fff;
    width: 300px;
    color: #2fb4f9;
}

.squares {
    list-style: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 1;
}

.squares li {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.15);
    position: absolute;
    bottom: -160px;
    /* 执行动画：动画名 时长 线性 无限次播放 */
    animation: square 20s linear infinite;
}

/* 为每一个方块设置不同的位置、大小、动画延迟时间、动画时长、背景色 */
.squares li:nth-child(1) {
    left: 10%;
}

.squares li:nth-child(2) {
    left: 20%;
    width: 80px;
    height: 80px;
    /* 动画延迟时间 */
    animation-delay: 0.2s;
    /* 动画时长 */
    animation-duration: 17s;
}

.squares li:nth-child(3) {
    left: 25%;
    animation-delay: 4s;
}

.squares li:nth-child(4) {
    left: 40%;
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.25);
    animation-duration: 22s;
}

.squares li:nth-child(5) {
    left: 70%;
}

.squares li:nth-child(6) {
    left: 80%;
    width: 120px;
    height: 120px;
    background-color: rgba(255, 255, 255, 0.2);
    animation-delay: 3s;
}

.squares li:nth-child(7) {
    left: 32%;
    width: 160px;
    height: 160px;
    animation-delay: 7s;
}

.squares li:nth-child(8) {
    left: 55%;
    width: 20px;
    height: 20px;
    animation-delay: 15s;
    animation-duration: 40s;
}

.squares li:nth-child(9) {
    left: 25%;
    width: 10px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.3);
    animation-delay: 2s;
    animation-duration: 40s;
}

.squares li:nth-child(10) {
    left: 90%;
    width: 160px;
    height: 160px;
    animation-delay: 11s;
}

.container.success h1 {
    transform: translateY(75px);
}

.container.success .form {
    opacity: 0;
    visibility: hidden;
}

/* 定义动画 */
@keyframes square {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-120vh) rotate(600deg);
    }
}

.btn ul li {
    // background-color: rgba(255,255,255,0.2);
    width: 250px;
    padding: 8px 15px;
    border-radius: 3px;
    --c: #fff;
    color: var(--c);
    border: 1px solid var(--c);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: 0.5s;
}

ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.btn ul li:hover {
    /* 鼠标移上改变按钮字体颜色 */
    color: #222;
}

.btn ul li span {
    /* 绝对定位 */
    position: absolute;
    width: 25%;
    height: 100%;
    background-color: var(--c);
    border-radius: 50%;
    /* 先沿Y轴下移,移出按钮范围 */
    transform: translateY(150%);
    /* 通过var函数调用自定义属性--n,结合calc函数计算得出left的值 */
    left: calc((var(--n) - 1) * 25%);
    /* 加个动画过渡 */
    transition: 0.5s;
    /* 设置每一个span元素的动画延迟时间 */
    transition-delay: calc((var(--n) - 1) * 0.1s);
    z-index: -1;
}

.btn ul li:hover span {
    /* 沿Y轴上移并放大 */
    transform: translateY(0) scale(2);
}

.btn ul li span:nth-child(1) {
    /* 自定义属性 */
    --n: 1;
}

.btn ul li span:nth-child(2) {
    --n: 2;
}

.btn ul li span:nth-child(3) {
    --n: 3;
}

.btn ul li span:nth-child(4) {
    --n: 4;
}